/**
 * @Project TMHSC
 * @Author Tran Manh Hung
 * @Email: hungtmit@gmail.com | tmh@xwebgate.com
 * @Copyright © 2011 TMH. All rights reserved
 * @Createdate Feb 1, 2011
 * @Createtime 1:31:01 AM
 */

package com.tmh.study.aASA
{
	import flash.display.Sprite;
	import flash.events.Event;

	public class VehicleTest extends Sprite
	{
		private var _vehicle:Vehicle;

		public function VehicleTest()
		{
			_vehicle = new Vehicle();
			addChild(_vehicle);

			_vehicle.position = new Vector2D(100, 100);
			_vehicle.velocity.length = 5;
			_vehicle.velocity.angle = Math.PI / 4;

			addEventListener(Event.ENTER_FRAME, enterFrameHandler);
		}

		private function enterFrameHandler(event:Event):void
		{
			_vehicle.update();
		}
	}
}